package com.mszlu.blog.vo;

import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import com.mszlu.blog.dao.pojo.SysUser;
import lombok.Data;

import java.util.List;

/**
 * @author Administrator
 */
@Data
public class CommentVo  {
    /**
     *  防止前端 精度损失 把id转为string
     * `@JsonSerialize(using = ToStringSerializer.class)
     */
    @JsonSerialize(using = ToStringSerializer.class)
    private String id;

    private UserVo author;

    private String content;
    /**
     * 子评论列表
     */
    private List<CommentVo> childrens;

    private String createDate;

    private Integer level;

    private UserVo toUser;
}
